Skip to content

refactor(smudge): Replace custom doubly linked list with std::deque in W3DSmudge - #3021

Open
stephanmeesters wants to merge 3 commits into
TheSuperHackers:mainfrom
stephanmeesters:refactor/smudge-deque
Open

refactor(smudge): Replace custom doubly linked list with std::deque in W3DSmudge#3021
stephanmeesters wants to merge 3 commits into
TheSuperHackers:mainfrom
stephanmeesters:refactor/smudge-deque

Conversation

@stephanmeesters

Copy link
Copy Markdown
  • Replaces DLListClass usages in W3DSmudge with std::deque. std::deque was chosen instead of std::list because we only needed removals/insertions at the front/back (no splicing).
  • Removes some unused functions to reduce the conversion work
  • Replaces bookkeeping field m_usedSmudgeCount with the queue's size

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown

Greptile Summary

Refactors smudge storage from intrusive doubly linked lists to standard deque-backed pointer queues.

  • Removes DLNodeClass inheritance and unused individual-removal APIs.
  • Derives the active smudge count directly from the queue size.
  • Updates allocation-pool cleanup, reset, lookup, and render-batch traversal to use deque operations and iterators.

Confidence Score: 5/5

The PR appears safe to merge with no actionable regressions identified.

The deque conversion preserves ownership, ordering, reset behavior, and render-batch traversal, while the removed APIs have no surviving callers or interface dependencies.

Important Files Changed

Filename Overview
Core/GameEngine/Include/GameClient/Smudge.h Replaces intrusive-list types and node inheritance with deque aliases while preserving the public smudge-management contract used by current callers.
Core/GameEngine/Source/GameClient/System/Smudge.cpp Converts pool ownership and traversal to explicit deque operations, removes unused APIs, and fixes free-smudge cleanup to pop from the correct queue.
Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cpp Converts both render passes and cross-batch resume state to deque iterators while preserving progress across hidden smudges, empty sets, and batch boundaries.

Reviews (1): Last reviewed commit: "Refactor smudge count to use current que..." | Re-trigger Greptile

@stephanmeesters stephanmeesters added the Refactor Edits the code with insignificant behavior changes, is never user facing label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant